// var WxParse = require('../../wxParse/wxParse.js');
function init(key){
  
  var that=this;
  // WxParse.wxParse('aHrefHrefData', 'html', aHrefHrefData, that);
  that.onCancel=function () {
    hideModal(false);
  }
  that.onConfirm= function () {
    hideModal(false);
    if (that.data[key].confirmCallback != undefined && that.data[key].confirmCallback!=''){
      that.confirmCallback();
    }
  }
  
  /* 隐藏/显示模态对话框*/
  function hideModal(flag) {
    var obj = that.data[key];
    obj.showModal = flag;
    var nObj = {};
    nObj[key] = obj;
    that.setData(nObj);
  }
}

module.exports = {
  init: init
};